<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Web访客接入</title>
<link href="https://cdn.bootcss.com/bootstrap/4.0.0-alpha.3/css/bootstrap.css" rel="stylesheet">
    </head>
    <body>
    <div class="well" style="max-width: 400px; margin: 0 auto 10px;">
      <button type="button" class="btn btn-primary btn-lg btn-block">Block level button</button>
      <button type="button" class="btn btn-default btn-lg btn-block">Block level button</button>
    </div>

    <div class="well">
        <h1 id="unreadNumbers" style="text-align:center"></h1>
        <h1 id="unreadMsg" style="text-align:center"></h1>
    </div>
        <script src="https://qiyukf.com/script/4ba53a88957fb27300d38fde30e0dc0f.js"
            charset="utf-8"></script>
        <script type="text/javascript">
            ysf.on({
                unread: function(result){
                    if(result.total){
                        document.getElementById('unreadMsg').innerHTML = result.message;
                        document.getElementById('unreadNumbers').innerHTML = result.total;
                    }
                }
            })
        </script>

    </body>
</html>
